<?php
    session_start();
?>

<script type="text/javascript">
function thoat() {
        if (confirm('Ban co chac chan muon thoat khong ?' )){
            window.location = 'index.php?option=thoat';
            //return;
        }
}

</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<link href="Libraries/css/style.css" rel="stylesheet" type="text/css" />    


  <div id="border">
	<div id="top">
	</div><!-- het top -->
	<div id="middle" align="center">
		
        
		<div id="slideshow">
			<?php 
                include("includes/slideshow.php"); 
				
                //include_once("Models/NguoiQuanTri.php");
               // include_once("Models/CanBoDaoTao.php");
                //include_once("Models/CanBoGiangDay.php");
                //include_once("Models/SinhVien.php");
            ?>
		</div><!-- het slideshow -->
        <?php
            //include("Configs/menu2.php");
        $option = $_GET['option'];
        if (session_is_registered('nmaso'))
        {
            $maquyen = $_SESSION['nmaquyen'] ;
           
            /*if ($maquyen=='AD'){
                $nd= new NguoiQuanTri();

                //$result = $nd->thongtinCanBo();
            }
            if ($maquyen=='DT'){
                $nd= new CanBoDaoTao();
                //$result = $nd->thongtinCanBo();
                
            }
            if ($maquyen=="DV" || $maquyen=="BM" || $maquyen=="GV"){
                $nd= new CanBoGiangDay();
                //$result = $nd->thongtinCanBo();
            }
            else 
            {
                $nd= new SinhVien();
            }*/
            //$nd->setMaSo($_SESSION['maso']);
            //$nd->setMaQuyen($_SESSION['maquyen']);
		    echo "<div id='menu'>";
                include("Configs/menu.php");           
            echo "</div>";
            echo "<div id='thongtindn' >";
                echo "<table border=\"0\" style=\"font-size: 12px;\" width='100%'>";
                    echo "<tr>";
                        echo "<td  style=\"color:#767676\" align='right'>";
                             
                                echo "<a href=\"#\">Hướng dẫn</a>"."|";
                                echo "<a href=\"javascript:thoat();\">Thoát</a>";
                           
                        echo "</td>";
                        
                    echo "</tr>";
                    echo "<tr>";
                        echo "<td style=\"color:#3872B2\" align='right'>";
                             
                                echo "xin chào ";
                                echo "<b>";
                                echo $_SESSION['nten'];
                                echo "(".$_SESSION['nmaso'].")" ;
                                echo "</b>";
                           
                        echo "</td>";
                        
                    echo "</tr>";
                  echo "</table>";
            echo "</div>";
            
            echo "<div id=\"center\">";
                
                     
                    if ($option == "dangnhap"){
                        include("controllers/DangnhapController.php");
                    }
                    if ($option == "phanquyen"){
                        include("Controls/PhanquyenController.php");
                    }
                    if ($option == "capnhatcb"){
                        include("Controls/CapnhatcanboController.php");
                    }
                    if ($option == "capnhatsinhvien"){
                        include("Controls/CapnhatsinhvienController.php");
                    }
                    if ($option == "thongtincanhan"){
                        include("Controls/ThongtincanhanController.php");
                    }
                    if ($option == "doimatkhau"){
                        include("Controls/DoimatkhauController.php");
                    }
                    if ($option == "capnhatkhoa"){
                        include("Controls/CapnhatkhoaController.php");
                    }
                     if ($option == "capnhatbomon"){
                        include("Controls/CapnhatbomonController.php");
                    }
                    if ($option == "capnhatchuyennganh"){
                        include("Controls/CapnhatchuyennganhController.php");
                    }
                    if ($option == "capnhathocphan" || $option == "xemdecuongcthp"){
                        include("Controls/CapnhathocphanController.php");
                    }
                    /*if ($option == "xemdecuongcthp"){
                        include("Views/xemdecuonghp.php");
                    }*/
                    /*if ($option == "xemdecuong"){
                        include("Controls/CapnhathocphanController.php");
                    }*/
                    /*if ($option == "capnhatdecuong"){
                        include("Controls/DecuongController.php");
                    }*/
                    
                    if ($option == "capnhatdecuonghpchitiet"){
                        include("Controls/DecuonghpchitietController.php");
                    }
                    if ($option == "capnhatlophp"){
                        include("Controls/LophocphanController.php");
                    }
                    if ($option == "capnhatnhomth"){
                        include("Controls/NhomThucHanhController.php");
                    }
                    if ($option == "capnhatctdt"){
                        include("Controls/CapnhatctdtController.php");
                    }
                    if ($option == "capnhattkb"){
                        include("Controls/ThoikhoabieuController.php");
                    }
                    if ($option == "xepthoikhoabieu"){
                        include("Controls/XepthoikhoabieuController.php");
                    }
                    if ($option == "capnhathknh"){
                        include("Controls/capnhathknhController.php");
                    }
                    if ($option == "capnhattgghinhatki"){
                        include("Controls/CapnhatthoigianghinhatkiController.php");
                    }
					if ($option == "capnhathpmovaohknh"){
                        include("Controls/capnhathpmovaohknhController.php");
                    }
                    if ($option == "xemthoikhoabieu"){
                        include("Controls/ThoikhoabieuController.php");
                    }
                    if ($option == "xemkhoiluonggd"){
                        include("Controls/XemkhoiluonggiangdayController.php");
                    }
                    if ($option == "xemtkthbomon"){
                        include("Controls/XemtkthcuabmController.php");
                    }
                    if ($option == "xemtkthdonvi"){
                        include("Controls/XemtkthcuadvController.php");
                    }
                    if ($option == "xemnhatki"){
                        include("Controls/NhatkiController.php");
                    }
                    if ($option == "ghinhatkigiangday" || $option == "tinhhinhghinhatki"){
                        include("Controls/NhatkiController.php");
                    }
                    if ($option == "thoat"){
                        include("Controls/ThoatController.php");
                    }
            echo "</div>";
        }
        else{
                if (empty($_GET['option'])){
                    echo "<div id=\"center\">";
                        include("views/Dangnhap.php");
                    echo "</div>";
                }
                else{
                    if ($option == "dangnhap"){
                        include("Controllers/DangnhapController.php");
                    }
                } 
                    
            
        }
        ?>
		
		 <div id="footer">
            <?php include("includes/footer.php"); ?>
         </div>  
	</div><!-- het middel -->
   
	<div id="bottom">
	<div><!-- het bottom -->
  </div><!-- het border -->           

